﻿<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>分享</title>
    <!-- Bootstrap -->
    <link href="/CSS/bootstrap3.3.5/css/bootstrap.css" rel="stylesheet">
    <link href="/CSS/font-awesome-4.3.0/css/font-awesome.min.css" rel="stylesheet">
    <link href="/CSS/Base/BaseClass.css?cssver=4" rel="stylesheet">
    <style>
        .tab-pane {
            padding: 20px;
        }

        .pCard {
            min-width: 80px;
            text-align: center;
            margin: 0 5px 5px 5px;
        }
    </style>
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
    <div class="container-fluid maindiv" style="margin: 20px" id="dvContent">
        <!-- Nav tabs -->

        <!-- Tab panes -->
        <div class="tab-content">
            <div role="tabpanel" class="tab-pane active" id="ckxz" style="padding-left: 0;padding-right: 0;">
                <div class="form-group">
                    <label>具有查看及下载权限的人员</label>
                    <input type="text" value="" class="span2   form-control  szhl_getPeoples" id="conckxz" />
                    <p class="text-danger textqy" style="display:none">企业文件夹下默认全部人员均具有查看及下载权限</p>
                </div>
            </div>
           
       
        </div>

        <div class="tab-content" style="display:none">
            <div role="tabpanel" class="tab-pane active" id="cksc" style="padding-left: 0;padding-right: 0;">
                <div class="form-group">
                    <label>具有上传权限的人员</label>
                    <input type="text" value="" class="span2   form-control  szhl_getPeoples" id="concksc" />
                </div>
            </div>
        </div>

        <div class="tab-content" id="updownli">
            <div role="tabpanel" class="tab-pane active" id="scxz" style="padding-left: 0;padding-right: 0;">
                <div class="form-group">
                    <label>具有全部权限的人员</label>
                    <input type="text" value="" class="span2   form-control  szhl_getPeoples" id="conscxz" />
                </div>
            </div>
        </div>
        <button class="btn btn-success qrqx"  id="conbtscxz"><i class="fa fa-spinner fa-spin" style="display:none"></i>确认权限</button>

    </div>
    <script src="/Scripts/jquery-1.11.2.min.js"></script>
    <script src="/CSS/bootstrap3.3.5/js/bootstrap.js"></script>
    <script src="/JqueryPlug/layer2/layer/layer.js"></script>
    <script src="/Scripts/SZHLCommon.js?jsver=5"></script>
    <script>
        $(document).ready(function () {
            var id = ComFunJS.getQueryString("id");
            var type = ComFunJS.getQueryString("type");
            var rootpath = ComFunJS.getQueryString("rootpath");

            if (rootpath == "1") {
                $(".textqy").show();
            }
            if (type == 'folder') {//如果是文件夹,显示管理权限
                $("#updownli").show()
            }
            ComFunJS.initsetajax();
            $.getJSON('/API/FTAPI.ashx?Action=GETWDITEM', { P1: type, P2: id }, function (resultData) {//P1为个人文件夹
                if (resultData.ErrorMsg == "") {
                    $("#conckxz").val(resultData.Result.ViewAuthUsers)
                    $("#concksc").val(resultData.Result.DownloadAuthUsers)
                    $("#conscxz").val(resultData.Result.UploadaAuthUsers)

                    ComFunJS.initForm();
                }
            })
            $(".qrqx").bind('click', function () {
                var dom = $(this);
                dom.addClass("disabled").find("i").show();
                $.post("/API/FTAPI.ashx?ACTION=SETAUTH", { P1: type, P2: id, authusers1: $("#conckxz").val(), authusers2: $("#concksc").val(), authusers3: $("#conscxz").val() }, function (result) {
                    var jsonresult = $.parseJSON(result)
                    dom.removeClass("disabled").find("i").hide();
                    if ($.trim(jsonresult.ErrorMsg) != "") {
                        ComFunJS.winwarning(jsonresult.ErrorMsg);
                    } else {
                        ComFunJS.winsuccessnew("操作成功");
                    }
                });

            })
        });
    </script>
</body>
</html>